#include "comm.hpp"

int main()
{
    int fd = open(ipcPath.c_str(), O_WRONLY);
    if (fd < 0)
    {
        perror("open");
        exit(1);
    }

    string buf;
    while (true)
    {
        cout << "msg enter >> ";
        getline(cin, buf);
        write(fd, buf.c_str(), buf.size());
    }

    close(fd);
    unlink(ipcPath.c_str()); //通信完毕
    return 0;
}